<?php
/**
 * 测试环境配置
 */
use EasySwoole\Log\LoggerInterface;

return [
    'SERVER_NAME' => "EasySwoole",
    'MAIN_SERVER' => [
        'LISTEN_ADDRESS' => '0.0.0.0',
        'PORT' => 9501,
        'SERVER_TYPE' => EASYSWOOLE_WEB_SERVER, //可选为 EASYSWOOLE_SERVER  EASYSWOOLE_WEB_SERVER EASYSWOOLE_WEB_SOCKET_SERVER
        'SOCK_TYPE' => SWOOLE_TCP,
        'RUN_MODEL' => SWOOLE_PROCESS,
        'SETTING' => [
            'worker_num' => 8,
            'reload_async' => true,
            'max_wait_time' => 3
        ],
        'TASK' => [
            'workerNum' => 4,
            'maxRunningNum' => 128,
            'timeout' => 15
        ]
    ],
    "LOG" => [
        'dir' => null,
        'level' => LoggerInterface::LOG_LEVEL_DEBUG,
        'handler' => null,
        'logConsole' => true,
        'displayConsole' => true,
        'ignoreCategory' => []
    ],
    'TEMP_DIR' => EASYSWOOLE_ROOT."/Temp",

    /*################ MYSQL CONFIG ##################*/
    'MYSQL' => [
        'host'          => '172.18.0.4', // 数据库地址
        'port'          => 3306, // 数据库端口
        'user'          => 'root', // 数据库用户名
        'password'      => 'root', // 数据库用户密码
        'timeout'       => 45, // 数据库连接超时时间
        'charset'       => 'utf8', // 数据库字符编码
        'database'      => 'test', // 数据库名
        'autoPing'      => 5, // 自动 ping 客户端链接的间隔
        'strict_type'   => false, // 不开启严格模式
        'fetch_mode'    => false,
        'returnCollection'  => false, // 设置返回结果为 数组
        // 配置 数据库 连接池配置，配置详细说明请看连接池组件 https://www.easyswoole.com/Components/Pool/introduction.html
        'intervalCheckTime' => 15 * 1000, // 设置 连接池定时器执行频率
        'maxIdleTime'   => 10, // 设置 连接池对象最大闲置时间 (秒)
        'maxObjectNum'  => 20, // 设置 连接池最大数量
        'minObjectNum'  => 5, // 设置 连接池最小数量
        'getObjectTimeout'  => 3.0, // 设置 获取连接池的超时时间
    ],

    /*################ REDIS CONFIG ##################*/
    'REDIS' => [
        "key_prefix"=>"key_prefix-",

        'host'          => '172.18.0.6', // Redis 地址
        'port'          => '6379', // Redis 端口
        'auth'          => '', // Redis 密码
        'timeout'       => 3.0, // Redis 操作超时时间
        'reconnectTimes' => 3, // Redis 自动重连次数
        'db'            => 0, // Redis 库
        'serialize'     => \EasySwoole\Redis\Config\RedisConfig::SERIALIZE_NONE, // 序列化类型，默认不序列化
        'packageMaxLength' => 1024 * 1024 * 2, // 允许操作的最大数据
        // 配置 Redis 连接池配置，配置详细说明请看连接池组件 https://www.easyswoole.com/Components/Pool/introduction.html
        'intervalCheckTime' => 15 * 1000, // 设置 连接池定时器执行频率
        'maxIdleTime'   => 10, // 设置 连接池对象最大闲置时间 (秒)
        'maxObjectNum'  => 20, // 设置 连接池最大数量
        'minObjectNum'  => 5, // 设置 连接池最小数量
        'getObjectTimeout'  => 3.0, // 设置 获取连接池的超时时间
        'loadAverageTime'   => 0.001, // 设置 负载阈值
    ],
    //redis队列
    'REDIS_QUEUE' => [
        'host' => '127.0.0.1',
        'port' => '6379',
        'auth' => '',
        'db' => 1
    ],
    //全文搜索引擎
    'ELASTICSEARCH'=>[
        'host' => '172.18.0.7',
        'port' => 9200
    ],
    //fastCacheQueue
    "FASTCACHEPROCESS"=>[
        [
            "jobName"=>"default",
            "noJobSleep"=> 0.2
        ],
        //...多消费进程
    ],
    //kafka消息队列
    'KAFKA'=>[
        "url"=>"172.18.0.9:9092",
        "version"=>'0.9.0',
        'process'=>[
            [
                'topics'=>['default'],
                'groupId'=>'default',
                'offsetReset'=>'earliest',
                'refreshIntervalMs'=>200,
            ],
            //...多消费进程
        ]
    ],

    /*################ APP_DATA CONFIG ##################*/
    'APP_DATA' => [
        //本服务ip
        "ServerIp"=> swoole_get_local_ip()['eth0'],
        //是否同账号可以同时不同设备登录
        "MultipleDevices"=> false,
        //jwt秘钥源
        "JwtOrigin"=> [
            "APP"=> "cdn_8aK!-09527-1",
            "PC" => "cdn_8aK!-09527-2",
            "XCX"=> "cdn_8aK!-09527-3",
            "GZH"=> "cdn_8aK!-09527-4",
            "ADMIN"=> "cdn_8aK!-09527-999",
        ],
        //七牛云配置
        "Qiniu" => [
            "key" => "mx-shop-112",
            "AccessKey" => "ScPOBnXOn45-gf5qjl5rDwpr3t-t_DLSGGm",
            "SecretKey" => "EP5Czqf6SvIiik5qyWktMJpBC1Io-x4YZlY"
        ],
        //RSA加密
        "RSA"=>[
            "private"=> "-----BEGIN PRIVATE KEY-----
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDtgHftlNqPSt6i
ql8JqBLaEL/gTXeXh64bMbcV7tQ2Rs70bNrfgKmDyXzGsHr44DpjTjU022mLlRwL
gFCsevxBK95wrFLN3c/GLXdY2ZcqNtvCDF4IsqdBMO4RykOyHkZwni36g6GWkxxo
dVwxdWSNeLC+zfHbrQpfks6wlkrF+i1gpBP9BOF90G5lMXMFPtvFpWEgkrS01yv9
cp3ARRh6048t+mdEhnFyV6Bqr8XtjkhNdFGEdG7iWjB8HDccL4EbGZihfUtJ49NW
r39wliXvkfHMAme6WDRwhgV9WifBUPPBuRHJX3cf2TR8lmDhtgMkZ07DhRFBrP36
6Ygepms0KGynakas8nbC1KfzTGHlq0YrNeNe7ofQN3yXOU3ub8lHWECCW70RKsrP
iWuDHLGg0hukS5w8jBiWwPgZKTQGlA7U6kCBTpNpdwe21fLYbD89o5KNBSPC7WV3
eUBY4YIzAZwJRVnASCks3NpXKk9918QRfrGlDdAT8WX/7xE4eAJ9JWlKbrSlwj4b
H+krtpWswp3E+8KReRL73kpCad3ziVuvfEgdG4eGTj1TgqpPoZKnuGaVNCvXw/xX
6kz2FLLGttkIOGGqPsgFrqFz5UWErDuFNXJ9yx8KdvLrRogdrNkZmi2T82XJ1Ta5
e+KL3WVZ+rAuJz5U9w1uM5cYRFCGmQIDAQABAoICAQDVMjN10992LdE42BNECdoS
YmK7qQ6nuaYyxygAykk5B8sTYvv/EfIZWS9m9FkPO8luB3B/qE5QfGOWd3Lzwdrb
bdP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UtJcpmEGXYjyfNGJD2G
xANVf4BFOMmaOQSdIzgNGVwMAI2SqEBYlFefkiFFLxVF9QaQDEy0zQAcCRNfn+ek
5Ta1mrragIC3qN/CGfRVqD9PyGywZZD2NMWtU0QXMKvpMGuYjEw+3h+qX5vW8jIi
4BO6K0RLOGbtqk8dEE7E7WapMwx2gyUncZqCh8PVqFM3PNiv8HuCO0mhQTP3203G
LINKboOeRCu6okY14WxFPXy0uiXHe30=
-----END PRIVATE KEY-----",
            "public"=>"-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7YB37ZTaj0reoqpfCagS
2hC/4E13l4euGzG3Fe7UNkbO9Gza34Cpg8l8xrB6+OA6Y041NNtpi5UcC4BQrHr8
QSvecKxSzd3Pxi13WNmXKjbbwgxeCLKnQTDuEcpDsh5GcJ4t+oOhlpMcaHVcMXVk
jXiwvs3x260KX5LOsJZKxfotYKQT/QThfdBuZTFzBT7bxaVhIJK0tNcr/XKdwEUY
etOPLfpnRIZxclegaq/F7Y5ITXRRhHRu4lowfBw3HC+BGxmYoX1LSePTVq9/cJYl
75HxzAJnulg0cIYFfVonwVDzwbkRyV93H9k0fJZg4bYDJGdOw4URQaz9+umIHqZr
NChsp2pGrPJ2wtSn80xh5atGKzXjXu6H0Dd8lzlN7m/JR1hAglu9ESrKz4lrgxyx
oNIbpEucPIwYlsD4GSk0BpQO1OpAgU6TaXcHttXy2Gw/PaOSjQUjwu1ld3lAWOGC
MwGcCUVZwEgpLNzaVypPfdfEEX6xpQ3QE/Fl/+8ROHgCfSVpSm60pcI+Gx/pK7aV
rMKdxPvCkXkS+95KQmnd84lbr3xIHRuHhk49U4KqT6GSp7hmlTQr18P8V+pM9hSy
xrbZCDhhqj7IBa6hc+VFhKw7hTVyfcsfCnby60aIHazZGZotk/NlydU2uXvii91l
WfqwLic+VPcNbjOXGERQhpkCAwEAAQ==
-----END PUBLIC KEY-----"
        ]
    ],
];
